<!--{template admin/header}-->
<!--{if 'modify'==$do}-->
<form action="admin.php?mod=channel&code=channeltype&do=domodify" method="post" enctype="multipart/form-data">
  <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    <tr class="header">
      <td colspan="3">编辑频道类型</td>
    </tr>
    <tr>
      <td colspan="3" bgcolor="#FFFFFF">说明：模板文件必须在模板目录的channel目录下存在，且是*.html类型文件，否则设置无效。名称字符必须是字母、数字、下划线，且首字符必须是字母，末字符不得是下划线。留空则使用系统模板。</td>
    </tr>
	<tr>
      <td class="altbg1">频道类型标识符 : </td>
      <td colspan="2" class="altbg2"><b>{$channel_typelist[channel_type]}</b></td>
    </tr>
	<tr>
      <td class="altbg1">频道类型 : </td>
      <td colspan="2" class="altbg2"><input type="hidden" name="oldchannel_typename" value="{$channel_typelist[channel_typename]}">
	  <input name="channel_typename" type="text" value="{$channel_typelist[channel_typename]}" size="20" /></td>
    </tr>
	<tr>
      <td class="altbg1">默认一级频道模板 : </td>
      <td colspan="2" class="altbg2"><input type="hidden" name="oldtemplate" value="{$channel_typelist[template]}">
	  <input name="template" type="text" value="{$channel_typelist[template]}" size="20" />.html</td>
    </tr>
	<tr>
      <td class="altbg1">默认二级频道模板 : </td>
      <td colspan="2" class="altbg2"><input type="hidden" name="oldchild_template" value="{$channel_typelist[child_template]}">
	  <input name="child_template" type="text" value="{$channel_typelist[child_template]}" size="20" />.html</td>
    </tr>
	<tr>
      <td class="altbg1">默认内容详细页模板 : </td>
      <td colspan="2" class="altbg2"><input type="hidden" name="oldtopic_template" value="{$channel_typelist[topic_template]}">
	  <input name="topic_template" type="text" value="{$channel_typelist[topic_template]}" size="20" />.html</td>
    </tr>
	<tr>
      <td class="altbg1">微博可具备属性 : </td>
      <td colspan="2" class="altbg2"><input type="hidden" name="oldfeatureid" value="{$channel_typelist[featureid]}">
	  {$featurehtml}<br><a href="admin.php?mod=feature">添加属性</a></td>
    </tr>
	<tr>
      <td class="altbg1">微博默认属性描述 : </td>
      <td colspan="2" class="altbg2"><input type="hidden" name="olddefault_feature" value="{$channel_typelist[default_feature]}">
	  <input type="text" name="default_feature" value="{$channel_typelist[default_feature]}"></td>
    </tr>
	    <tr>
	      <td class="altbg1">&nbsp;</td>
	      <td width="7%" align="left" >    
		  <center>
    <input type="submit" class="button" name="editsubmit" value=" 提 交 ">
    <input name="channel_typeid" type="hidden" id="channel_typeid" value="{$channel_typelist[channel_typeid]}" />
          </center>		  </td>
          <td width="63%" align="left" >&nbsp;</td>
    </tr>
  </table>
</form>
<!--{else}-->
<form action="admin.php?mod=channel&code=channeltype&do=add" method="post" enctype="multipart/form-data">
  <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    <tr class="header">
      <td colspan="4"> 添加频道类型（说明：模板文件必须在模板目录的channel目录下存在，否则设置无效）</td>
    </tr>
	<tr>
      <td colspan="4">说明：频道类型（或模型）名称可以是中英文字符；但类型标识符只能是英文字母符号，不同类型的名称与标识符必须保证唯一</td>
    </tr>
    <tr>
      <td class="altbg2" width="250">类型名称： <input name="channel_typename" type="text" value="" size="20"></td>
	  <td class="altbg2" width="270">类型标识符：<input name="channel_type" type="text" value="" size="20"></td>
      <td class="altbg2"><input type="submit" class="button" name="addsubmit" value="添 加"></td>
    </tr>
  </table>
</form>
<form method="post" action="admin.php?mod=channel&code=channeltype&do=delete">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
			<tr class="header">
				<td width="50"><input class="checkbox" type="checkbox" name="chkall" onclick="checkall(this.form,'ids')" >删</td>	
				<td>类型名称</td>
				<td>默认属性</td>
				<td>一级频道模板</td>
				<td>二级频道模板</td>
				<td>内容详细页模板</td>
				<td>操作</td>
			</tr>
			<!--{loop $channel_type_list $val}-->
			<tr align="center">
				<td class="altbg1"><input class="checkbox" type="checkbox" name="ids[]" value="$val[channel_typeid]" ></td>
				<td class="altbg1">{$val[channel_typename]}[{$val[channel_type]}]</td>
				<td class="altbg1">{$val[default_feature]}</td>
				<td class="altbg1">{$val[template]}</td>
				<td class="altbg1">{$val[child_template]}</td>
				<td class="altbg1">{$val[topic_template]}</td>
				<td class="altbg1"><a href="admin.php?mod=channel&amp;code=channeltype&amp;do=modify&amp;ids={$val[channel_typeid]}">编辑</a>
				<!--{if $val[channel_typeid]>2}-->
				&nbsp;&nbsp;<A href="admin.php?mod=channel&amp;code=channeltype&amp;do=delete&amp;ids={$val[channel_typeid]}">删除</A>
				<!--{/if}-->
				</td>
			</tr>
			<!--{/loop}-->
			<!--{if $page_arr[html]}-->
			<tr align="center">
				<td colspan="6" class="altbg1">{$page_arr[html]}</td>
			</tr>
			<!--{/if}-->
		</table>
<center>
<button type="submit" class="button"> 提 交 </button>
</center>
</form>
<!--{/if}-->